<include file="public@header" />
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('task/companyList')}">公司交易</a></li>
        <li><a href="{:url('task/qualification')}">资质交易</a></li>
        <li><a href="{:url('task/mark')}">商标交易</a></li>
        <li class="active"><a href="{:url('task/patent')}">专利交易</a></li>
    </ul>
    <form action="{:url('Rbac/listorders')}" method="post" class="margin-top-20">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th width="40">ID</th>
                <th align="left">名称</th>
                <th align="left">编码</th>
                <th width="80" align="left">状态</th>
                <th width="160">{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="data" item="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.name}</td>
                    <td>{$vo.code}</td>
                    <td>
                        <if condition="$vo['verify'] eq 0">
                            <span class="label label-danger">未审核</span>
                            <elseif condition="$vo['verify'] eq 1"/>
                            <span class="label label-success">审核通过</span>
                            <elseif condition="$vo['verify'] eq 2"/>
                            <span class="label label-danger">审核失败</span>
                            <elseif condition="$vo['verify'] eq 3"/>
                            <span class="label label-danger">下架</span>
                        </if>
                    </td>
                    <td>

                        <if condition="$vo['verify'] eq 0">
                            <a class="btn btn-xs js-ajax-dialog-btn label label-success" href="{:url('task/patentVerify',array('id'=>$vo['id'],'val'=>1))}">通过</a>
                            <else />

                        </if>
                        <if condition="$vo['verify'] eq 3">
                            <a class="btn btn-xs js-ajax-dialog-btn label label-success" href="{:url('task/patentVerify',array('id'=>$vo['id'],'val'=>1))}">上架</a>
                            <else />
                            <a class="btn btn-xs js-ajax-dialog-btn label label-success" href="{:url('task/patentVerify',array('id'=>$vo['id'],'val'=>3))}">下架</a>
                        </if>
                        <a class="btn btn-xs  test" data="{$vo.id}">详情</a>
                        <!--<if condition="cmf_get_current_admin_id() eq 1"> <a class="btn btn-xs btn-danger js-ajax-delete" class="" href="{:url('Rbac/roledelete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a></if>-->
                        <!--<a class="btn btn-xs btn-primary" href="{:url('Rbac/roleedit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>-->

                    </td>
                </tr>
            </foreach>
            </tbody>
            <tr><td colspan="5" style="text-align: right"><div class="pagination" style="text-align: right">{$data->render()} <li class="page-item"><a class="page-link" href="javascript:void(0)">共{$data->total()}条</a></li></div></td></tr>
        </table>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script src="__STATIC__/js/NZ-Window.min.js"></script>
<script src="__STATIC__/js/NZ-Drag.min.js"></script>
<script>
    $(function () {

        $(".test").click(function () {
            var id = $(this).attr('data')
            $.NZ_Window.show({
                url: "{:url('task/patentDetail')}"+"?id="+id,
                width: 1300,
                height: 800,
                title: "专利交易"
            });
        });
    })
</script>
</body>
</html>